services.AddDbContext<AppDbContext>(opt => opt.UseInMemoryDatabase("PantryInMemoryDb"));Code language: C# (cs)